<?php
defined( '_JEXEC' ) or die( 'Restricted access' );

require_once(JPATH_COMPONENT.DS.'controller.php');

if($controller = JRequest::getWord('controller')) {
    $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
    if(file_exists($path)) {
        require_once $path;
    } else {
        $controller = '';
    }
}

$classname = 'SimplelistingController'.ucfirst($controller);
$controller = new $classname();

$controller->execute(JRequest::getCmd('task'));

$controller->redirect();

$document =& JFactory::getDocument();
$document->addStyleSheet(JURI::base().'components/com_simplelisting/assets/admin.css');
?>

<div id="poweredbycw">
    <p class="poweredbycw"><?php echo JTEXT::_('POWEREDBY_MSG'); ?> <a href="http://www.celtaweb.com" target="_blank" title="CeltaWeb">CeltaWeb</a> Version 1.4.9</p>
</div>
